<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button :class="classes">显示这段文本</button>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script>
        var app =new Vue({
            el:'#app',
            data:{
                size:'large',
                disabled:true
            },
            computed:{
                classes:function(){
                    return[
                        'btn',
                        {
                            ['btn-' + this.size]:this.size !== '',
                            ['btn-disabled']: this.disabled
                        }
                    ];
                }
            }
        })
    </script>
</body>
</html>